﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataModel;
using SchoolBusiness;

namespace SchoolAdministration
{
    public partial class DetailStudent : System.Web.UI.Page
    {
        private readonly Student blstd = new Student();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadStudent();
            }
        }
        public void  LoadStudent()
        {
        int id=int.Parse(Request.QueryString["StudentId"]);
        MStudent _std = new MStudent();
        _std = blstd.GetStudentById(id);
        LblStdname.Text = lblFullName.Text = _std.FirstName;
        lblRoll.Text = _std.Roll.ToString();
        lblClass.Text = _std.Grade.ToString();
        lblDOB.Text = _std.DOB.ToShortDateString();
        lblAddress.Text = _std.Address;
        lblSection.Text = _std.section;
        lblMobile.Text = _std.Mobile;
        imgStudent.ImageUrl = _std.images.PhotoPath;
        }
    }
}